package net.lzzy.practices.web.models;

import lombok.Getter;
import lombok.Setter;
import net.lzzy.practices.entities.Applicant;

import java.util.Date;
import java.util.UUID;

/**
 * @author  Jaymo on 2022/5/26
 */
@Setter
@Getter
public class VmApplicant {
    private  final UUID id;

    private final  int status;

    private final Date applyTime;

    private  final  UUID courseId;

    private  final  String name;
    private  final  String desc;
    private  final  String cover;
    private  final  Date createTime;
    private  final  Date updateTime;
    private  final  String teacherName;
    private  final  String teacherAvatar;
    private  final  String studentName;
    private  final  String studentAvatar;





    public  VmApplicant(Applicant applicant){
        id = applicant.getId();
        status = applicant.getStatus();
        applyTime = applicant.getApplyTime();
        courseId = applicant.getCourse().getId();
        name = applicant.getCourse().getName();
        desc = applicant.getCourse().getDescription();
        cover = applicant.getCourse().getCover();
        createTime = applicant.getCourse().getCreateTime();
        updateTime = applicant.getCourse().getUpdateTime();
        teacherName =applicant.getCourse().getTeacher().getNickName();
        teacherAvatar =applicant.getCourse().getTeacher().getAvatar();
        studentAvatar =applicant.getStudent().getAvatar();
        studentName = applicant.getStudent().getNickName();


    }
}
